String libaries - introductionPermalink

The libraries in the String Libraries package can be used to process strings which are UTF-8 encoded. The basis is the ‎IString ‎interface from the ‎String Segments ‎library. Using this interface, the strings can be passed to the respective functions by reference. For example, to create an ‎IString‎ instance, the ‎GSB.UTF8String‎ function block from the ‎Generic String Base‎ library is provided.

Table 915: The following libraries are supplied with the package:

String Segments

Base functions for IString instances.

String Builder

Efficient management of UTF-8 encoded string segments.

String Conversions

Conversion of strings of different encoding to/from UTF-8.

String Functions

Functions for processing UTF-8 encoded strings following the example of the conventional standard library.

Unicode Support

Functions for processing UNICODE character categories.

UTF-16 Encoding Support

Base function for handling UTF-16 encoded memory areas.

UTF-8 Encoding Support

Base function for handling UTF-8 encoded memory areas.

Generic String Base

Function blocks for processing UTF-8 encoded strings which manage their memory statically via “GENERIC CONSTANT”.

StringUtils library

With the help of the StringUtils library, strings in the AC500 PLC application can be handled and modified. How to use the available functions is demonstrated in the application example ‎⮫ StringUtils library.